gtkwindow: css offset for toplevel only
authorOlivier Fourdan <ofourdan@redhat.com>
Tue, 10 Nov 2015 11:00:48 +0000 (12:00 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 10 Nov 2015 17:35:23 +0000 (12:35 -0500)
commitf2b373add81d5d1528a71c5eab90b6354b547465
tree2bbaa548965612b6923bf458a178e98e11bec67d
parent69cbf0a129b7965a02fa03dce58da8bba413338c
gtkwindow: css offset for toplevel only

At the time gtk_window_move() or gtk_window_resize() get called, there
is no way to predict if a popup window will actually draw its shadow, so
applying an offset in this case may end up with a wrong size or
positioning for such windows.

Changing the logic in gtk_window_should_use_csd() as previously done to
address that issue will cause some other breakage as popup windows may
not draw a shadow but still need CSD.

So best is to actually apply client side decorations offset for regular,
top level windows only. This is actually a lot simpler and safer and
less likely to cause additional breakage.

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=756618
gtk/gtkwindow.c